# 示例1 求绝对值  等同【demo_3_2_1_2_if_else语句.py】的示例7，相当于简化语法
c = -9
d = None
# 条件表达式
d = c if c > 0 else -c

print("d = %d\n" % d)
# 示例1 ----------------------------------------------------------------------